package com.abou.mvc.controller.customer;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.SessionAttributes;
import com.abou.model.common.product.search.SearchProductsRequest;
import com.abou.mvc.controller.ACommonController;
import com.abou.mvc.controller.ControllerUtils;

/**
 * The controller for the contact us page
 * 
 * @author khalid
 */
@Controller
@RequestMapping("/customer/contactus.do")
@SessionAttributes(ControllerUtils.SEARCH_REQUEST_ATT)
public class ContactUsController extends ACommonController {
  
  /**
   * The constructor of the class
   */
  public ContactUsController() {

    super("customer/contactus", null, true);
  }
  
  /**
   * Shows the home page.
   * 
   * @param model The model
   * @return The search request
   */
  @RequestMapping(method = RequestMethod.GET)
  @ModelAttribute(ControllerUtils.SEARCH_REQUEST_ATT)
  public SearchProductsRequest show(ModelMap model) {

    SearchProductsRequest searchRequest = new SearchProductsRequest();
    model.put(ControllerUtils.SEARCH_REQUEST_ATT, searchRequest);
    
    return searchRequest;
  }
}